
//读取用户输入的内容
//计算机生成一个随机的内容
//比较结果并输出

const { game } = require('./lib.js')
const playerAction = process.argv[process.argv.length - 1]
let count = 0;
process.stdin.on('data', (e) => {
    const result = game(e.toString().trim())
    if (result === 1) {

        count++

    }
    if (count === 3) {
        console.log('你太厉害了，我不玩了');
        process.exit()


    }
}
)
// const result = game(playerAction)
